package cn.sytton.taffecloud.common.api.service;

import cn.sytton.taffecloud.common.api.sentinel.fallback.CommonFallbackFactory;
import cn.sytton.taffecloud.common.base.response.R;
import cn.sytton.taffecloud.common.model.file.FileEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.File;

/**
 * Auth服务
 *
 * @author skyrock
 */
@FeignClient(contextId = "remoteAuthService", value = "taffecloud-service-auth", fallbackFactory = CommonFallbackFactory.class)
public interface RemoteAuthService {

    /**
     * 获取加密密码
     * @param pwd
     * @return
     */
    @GetMapping("/pwd/encode")
    R<String> encode(@RequestParam String pwd);

    /**
     * 匹配密码
     * @param rawPwd
     * @param encodePwd
     * @return
     */
    @GetMapping("/pwd/matches")
    R<Boolean> matches(@RequestParam String rawPwd, @RequestParam String encodePwd);
}
